<script id="modal-template" type="text/x-handlebars-template">
    {{#if name}}
    <style>
        .modal-dialog #resource-name { display: none; }        
    </style>
    {{/if}}

    <div class="modal-dialog modal-lg modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">{{name}}</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                {{> (lookup . 'template') }}
            </div>
        </div>
    </div>
</script>

<script>
    Handlebars.registerPartial("modal-template", $("#modal-template").html());
</script>